package com.hg.miaosha.common.exception;

import com.hg.miaosha.common.enums.SeckillEnums;
import lombok.Getter;

/**
 * 秒杀业务异常
 * Created by skh on 2017/12/13
 */
@Getter
public class SeckillException extends RuntimeException {
	private Integer code;

	public SeckillException(String message) {
		super(message);
	}

	public SeckillException(Integer code, String message) {
		super(message);
		this.code = code;
	}

	public SeckillException(SeckillEnums seckillEnums) {
		super(seckillEnums.getMessage());
		this.code = seckillEnums.getCode();
	}
}
